<?php

include_once ('bd/ModeloBD.php');

class ModeloEStudio extends ModeloBD {

    private $esrecodsx;
    private $aecodsx;
    private $necodsx;
    private $usucodsx;
    private $paiscodsx;
    private $esretitulo;
    private $esreinstitucion;
    private $esreestadocurso;
    private $esrefechaini;
    private $esrefechafin;
    private $esreobservacion;
    private $esreestado;
    

    public function __construct($esrecodsx = "", $aecodsx = "", $necodsx = "", $usucodsx = "", $paiscodsx = "", $esretitulo = "", $esreinstitucion = "", $esreestadocurso = "", $esrefechaini = "", $esrefechafin = "", $esreobservacion = "", $esreestado = "") {

        $this->_oBaseDatos = CBaseDatos::get_instancia();
        $this->_oBaseDatos->conectar();
        $this->_sTabla = "experiencialab";
        $this->esrecodsx = $esrecodsx;
        $this->aecodsx = $aecodsx;
        $this->necodsx = $necodsx;
        $this->usucodsx = $usucodsx;
        $this->paiscodsx = $paiscodsx;
        $this->esretitulo = $esretitulo;
        $this->esreinstitucion = $esreinstitucion;
        $this->esreestadocurso = $esreestadocurso;
        $this->esrefechaini = $esrefechaini;
        $this->esrefechafin = $esrefechafin;
        $this->esreobservacion = $esreobservacion;
        $this->esreestado = $esreestado;
    }

    public function crearEStudio() {

        $paiscodsx = 1;
        $aecodsx=$this->aecodsx ;
        $necodsx=$this->necodsx;
        $usucodsx=$this->usucodsx  ;
        $esretitulo= $this->esretitulo ;
        $esreinstitucion=$this->esreinstitucion  ;
        $esreestadocurso=$this->esreestadocurso ;
        $esrefechaini=$this->esrefechaini ;
        $esrefechafin= $this->esrefechafin ;
        $esreobservacion=$this->esreobservacion;
        $esreestado = 1;


        $sSQL = "INSERT INTO $this->_sTabla
               ( aecodsx , necodsx , usucodsx , paiscodsx , esretitulo , esreinstitucion , esreestadocurso , esrefechaini , esrefechafin , esreobservacion , esreestado ) 
               VALUES('$aecodsx','$necodsx' , '$usucodsx','$paiscodsx', '$esretitulo','$esreinstitucion','$esreestadocurso' , '$esrefechaini', '$esrefechafin','$esreobservacion' , '$esreestado')";
        $this->execute($sSQL);
    }

    
}

?>